#define _CRT_SECURE_NO_WARNINGS 1
//打印1000~2000年之间所有的闰年

#include<stdio.h>

int main()
{
	int year;
	int count = 0;
	for (year = 1000; year <= 2000; year++)
	{
		if ((0 == year % 4 && 0 != year % 100) || (0 == year % 400))
		{
			printf("%5d", year);
			count++;
		}
	}
	printf("\n");
	printf("%d\n", count);
	return 0;
}